<% if %w[categories moods strategies].include?(local_assigns[:data_type]) %>
  <% most_focus_data = most_focus(local_assigns[:data_type], local_assigns[:user]) %>
  <% if most_focus_data.present? %>
    <div class="stats">
      <% if local_assigns[:user] %>
        <div class="title">
          <%= local_assigns[:data_type].pluralize.titleize %>
        </div>
      <% end %>
      <div class="subtitle">
        <% if local_assigns[:user] == current_user %>
          <%= t('shared.stats.you_are_focusing') %>
        <% elsif local_assigns[:user] %>
          <%= t('shared.stats.user_is_focusing', name: local_assigns[:user].name) %>
        <% end %>
      </div>
      <div class="mostFocus">
        <% most_focus_data.each do |key, value| %>
          <div class="someFocus">
            <div class="someFocusText">
              <% if local_assigns[:data_type] == 'categories' && local_assigns[:user] == current_user %>
                <%= viewers_hover(get_viewers_for(Category.find(key), 'categories'), Category.find(key)) %>
              <% elsif local_assigns[:data_type] == 'categories' && local_assigns[:user] %>
                <div class="someFocusTextName">
                  <%= Category.find_by(id: key).name %>
                </div>
              <% elsif local_assigns[:data_type] == 'moods' && local_assigns[:user] == current_user %>
                <%= viewers_hover(get_viewers_for(Mood.where(id: key).first, 'moods'), Mood.where(id: key).first) %>
              <% elsif local_assigns[:data_type] == 'moods' && local_assigns[:user] %>
                <div class="someFocusTextName">
                  <%= Mood.find_by(id: key).name %>
                </div>
              <% elsif local_assigns[:data_type] == 'strategies' && local_assigns[:user] == current_user %>
                <%= viewers_hover(get_viewers_for(Strategy.find(key), 'strategies'), Strategy.find(key)) %>
              <% elsif local_assigns[:data_type] == 'strategies' && local_assigns[:user] %>
                <div class="someFocusTextName">
                  <%= Strategy.find(key).name %>
                </div>
              <% end %>
            </div>
          </div>
        <% end %>
      </div>
    </div>
  <% end %>
<% elsif local_assigns[:data_type] == 'moment' %>
  <%= sanitize(moments_stats) %>
<% end %>
